<?php

/**
 * Description of getDayIntervalsAction
\* www.teuker.nl - mail@teuker.nl
 * 
 * @author francisc
 */

class getDayIntervalsAction extends sfAction {

    public function execute($request) {
        $day = $request->getParameter('day') - 1;
        
        $intervals = SqlEngine::getDayIntervalsInfo(array('day' => $day,
                                                          'restaurant_id' => $this->getUser()->getAttribute('current_restaurant_id')));

        return $this->renderPartial('day_interval_tab', array('intervals' => $intervals,
                                                              'day' => $day));
    }
}
